package com.hnas.ecard.dao;

import java.util.List;

import com.hnas.core.dao.BaseDao;
import com.hnas.ecard.orm.CardTrail;

public interface CardTrailDAO extends BaseDao<CardTrail> {

	/**
	 * 通过电子卡状态分页查询电子卡信息
	 * @param searchStatus
	 * @param pageNo
	 * @param pageSize
	 * @return List<AccECard>
	 */
	List<CardTrail> findCardTrailByStatus(String accId ,String phoneNo, String searchStatus, Integer pageNo, Integer pageSize) throws Exception;
	
	/**
	 * 通过电子卡状态查询电子卡
	 * @param accId
	 * @param phoneNo
	 * @return
	 */
	List<CardTrail> findCardsByStatus(String accId ,String phoneNo,String status);
	
	CardTrail saveOrUpdate(CardTrail dto) throws Exception;
	
	/**
	 * 通过sql查询
	 * @param sql
	 * @return
	 */
	List<CardTrail> searchCardTrailSql(CardTrail vo);
	
	List<CardTrail> findCardTrailsByCardNoAndSomeStatus(String cardNo, String someStatus, Boolean isDeleted);

	List<CardTrail> listOverTime();
	/**
	 * 自动退回赠送中超时的卡
	 * @Title: autoReturnECard  
	 * @Description:  
	 * @param id
	 * @param id2
	 * @throws
	 */
	void autoReturnECard(String id, String id2);

	List<CardTrail> listByCardAndDate(String cardNo, String date);
	/**
	 * 自动退卡(购卡给他人)
	 * @Title: autoReturnECardSaleForOther  
	 * @Description:  
	 * @param id
	 * @throws
	 */
	void autoReturnECardSaleForOther(String id);
}
